1
0

Flexi - kaleidoscope template [commented composite shader].milk 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. MILKDROP_PRESET_VERSION=201
  2. PSVERSION=2
  3. PSVERSION_WARP=2
  4. PSVERSION_COMP=2
  5. [preset00]
  6. fRating=1.000
  7. fGammaAdj=1.560
  8. fDecay=1.000
  9. fVideoEchoZoom=0.362
  10. fVideoEchoAlpha=0.000
  11. nVideoEchoOrientation=1
  12. nWaveMode=0
  13. bAdditiveWaves=0
  14. bWaveDots=0
  15. bWaveThick=1
  16. bModWaveAlphaByVolume=0
  17. bMaximizeWaveColor=0
  18. bTexWrap=1
  19. bDarkenCenter=0
  20. bRedBlueStereo=0
  21. bBrighten=0
  22. bDarken=1
  23. bSolarize=0
  24. bInvert=0
  25. fWaveAlpha=0.001
  26. fWaveScale=1.599
  27. fWaveSmoothing=0.000
  28. fWaveParam=-0.500
  29. fModWaveAlphaStart=2.000
  30. fModWaveAlphaEnd=2.000
  31. fWarpAnimSpeed=1.000
  32. fWarpScale=1.331
  33. fZoomExponent=1.00000
  34. fShader=1.000
  35. zoom=0.99952
  36. rot=0.00000
  37. cx=0.500
  38. cy=0.500
  39. dx=-0.00500
  40. dy=0.00000
  41. warp=0.01000
  42. sx=1.00000
  43. sy=1.00000
  44. wave_r=0.510
  45. wave_g=0.500
  46. wave_b=1.000
  47. wave_x=0.500
  48. wave_y=0.500
  49. ob_size=0.005
  50. ob_r=1.000
  51. ob_g=1.000
  52. ob_b=1.000
  53. ob_a=1.000
  54. ib_size=0.000
  55. ib_r=0.250
  56. ib_g=0.250
  57. ib_b=0.250
  58. ib_a=1.000
  59. nMotionVectorsX=64.000
  60. nMotionVectorsY=48.000
  61. mv_dx=0.000
  62. mv_dy=0.000
  63. mv_l=0.500
  64. mv_r=0.000
  65. mv_g=0.000
  66. mv_b=0.000
  67. mv_a=0.000
  68. b1n=0.000
  69. b2n=0.000
  70. b3n=0.000
  71. b1x=1.000
  72. b2x=1.000
  73. b3x=1.000
  74. b1ed=0.000
  75. wavecode_0_enabled=0
  76. wavecode_0_samples=512
  77. wavecode_0_sep=0
  78. wavecode_0_bSpectrum=0
  79. wavecode_0_bUseDots=0
  80. wavecode_0_bDrawThick=0
  81. wavecode_0_bAdditive=0
  82. wavecode_0_scaling=0.16188
  83. wavecode_0_smoothing=0.50000
  84. wavecode_0_r=1.000
  85. wavecode_0_g=1.000
  86. wavecode_0_b=1.000
  87. wavecode_0_a=1.000
  88. wavecode_1_enabled=0
  89. wavecode_1_samples=512
  90. wavecode_1_sep=0
  91. wavecode_1_bSpectrum=0
  92. wavecode_1_bUseDots=0
  93. wavecode_1_bDrawThick=1
  94. wavecode_1_bAdditive=1
  95. wavecode_1_scaling=25.12601
  96. wavecode_1_smoothing=1.00000
  97. wavecode_1_r=1.000
  98. wavecode_1_g=1.000
  99. wavecode_1_b=1.000
  100. wavecode_1_a=0.100
  101. wavecode_2_enabled=0
  102. wavecode_2_samples=512
  103. wavecode_2_sep=0
  104. wavecode_2_bSpectrum=0
  105. wavecode_2_bUseDots=0
  106. wavecode_2_bDrawThick=0
  107. wavecode_2_bAdditive=0
  108. wavecode_2_scaling=1.00000
  109. wavecode_2_smoothing=0.50000
  110. wavecode_2_r=1.000
  111. wavecode_2_g=1.000
  112. wavecode_2_b=1.000
  113. wavecode_2_a=1.000
  114. wavecode_3_enabled=0
  115. wavecode_3_samples=512
  116. wavecode_3_sep=0
  117. wavecode_3_bSpectrum=0
  118. wavecode_3_bUseDots=0
  119. wavecode_3_bDrawThick=0
  120. wavecode_3_bAdditive=0
  121. wavecode_3_scaling=1.00000
  122. wavecode_3_smoothing=0.50000
  123. wavecode_3_r=1.000
  124. wavecode_3_g=1.000
  125. wavecode_3_b=1.000
  126. wavecode_3_a=1.000
  127. shapecode_0_enabled=0
  128. shapecode_0_sides=100
  129. shapecode_0_additive=0
  130. shapecode_0_thickOutline=1
  131. shapecode_0_textured=0
  132. shapecode_0_num_inst=1
  133. shapecode_0_x=0.500
  134. shapecode_0_y=0.500
  135. shapecode_0_rad=0.50126
  136. shapecode_0_ang=0.00000
  137. shapecode_0_tex_ang=0.00000
  138. shapecode_0_tex_zoom=0.99996
  139. shapecode_0_r=1.000
  140. shapecode_0_g=1.000
  141. shapecode_0_b=1.000
  142. shapecode_0_a=1.000
  143. shapecode_0_r2=1.000
  144. shapecode_0_g2=0.000
  145. shapecode_0_b2=0.000
  146. shapecode_0_a2=0.000
  147. shapecode_0_border_r=1.000
  148. shapecode_0_border_g=1.000
  149. shapecode_0_border_b=1.000
  150. shapecode_0_border_a=0.000
  151. shapecode_1_enabled=0
  152. shapecode_1_sides=100
  153. shapecode_1_additive=0
  154. shapecode_1_thickOutline=1
  155. shapecode_1_textured=0
  156. shapecode_1_num_inst=1
  157. shapecode_1_x=0.500
  158. shapecode_1_y=0.500
  159. shapecode_1_rad=0.50126
  160. shapecode_1_ang=0.00000
  161. shapecode_1_tex_ang=0.00000
  162. shapecode_1_tex_zoom=1.00000
  163. shapecode_1_r=1.000
  164. shapecode_1_g=1.000
  165. shapecode_1_b=1.000
  166. shapecode_1_a=1.000
  167. shapecode_1_r2=0.000
  168. shapecode_1_g2=0.000
  169. shapecode_1_b2=1.000
  170. shapecode_1_a2=0.000
  171. shapecode_1_border_r=1.000
  172. shapecode_1_border_g=0.000
  173. shapecode_1_border_b=1.000
  174. shapecode_1_border_a=0.000
  175. shapecode_2_enabled=0
  176. shapecode_2_sides=100
  177. shapecode_2_additive=0
  178. shapecode_2_thickOutline=1
  179. shapecode_2_textured=0
  180. shapecode_2_num_inst=1
  181. shapecode_2_x=0.500
  182. shapecode_2_y=0.500
  183. shapecode_2_rad=0.50126
  184. shapecode_2_ang=0.00000
  185. shapecode_2_tex_ang=0.00000
  186. shapecode_2_tex_zoom=0.99980
  187. shapecode_2_r=1.000
  188. shapecode_2_g=1.000
  189. shapecode_2_b=1.000
  190. shapecode_2_a=1.000
  191. shapecode_2_r2=0.000
  192. shapecode_2_g2=1.000
  193. shapecode_2_b2=0.000
  194. shapecode_2_a2=0.000
  195. shapecode_2_border_r=1.000
  196. shapecode_2_border_g=1.000
  197. shapecode_2_border_b=1.000
  198. shapecode_2_border_a=0.000
  199. shapecode_3_enabled=0
  200. shapecode_3_sides=4
  201. shapecode_3_additive=0
  202. shapecode_3_thickOutline=0
  203. shapecode_3_textured=0
  204. shapecode_3_num_inst=1
  205. shapecode_3_x=0.500
  206. shapecode_3_y=0.500
  207. shapecode_3_rad=0.10000
  208. shapecode_3_ang=0.00000
  209. shapecode_3_tex_ang=0.00000
  210. shapecode_3_tex_zoom=1.00000
  211. shapecode_3_r=1.000
  212. shapecode_3_g=0.000
  213. shapecode_3_b=0.000
  214. shapecode_3_a=1.000
  215. shapecode_3_r2=0.000
  216. shapecode_3_g2=1.000
  217. shapecode_3_b2=0.000
  218. shapecode_3_a2=0.000
  219. shapecode_3_border_r=1.000
  220. shapecode_3_border_g=1.000
  221. shapecode_3_border_b=1.000
  222. shapecode_3_border_a=0.100
  223. per_frame_1=// Flexis dampened sound response functions
  224. per_frame_2=
  225. per_frame_3=db = db*0.98 + bass*0.2; // dampener
  226. per_frame_4=bb = bb + db*0.1; // accumulation, replace time expressions with this ;)
  227. per_frame_5=
  228. per_frame_6=dt = dt*0.98 + treb*0.2;
  229. per_frame_7=tt = tt + dt*0.1;
  230. per_frame_8=
  231. per_frame_9=dm = dm*0.98 + mid*0.2;
  232. per_frame_10=mm = mm + dm*0.1;
  233. per_frame_11=
  234. per_frame_12=
  235. per_frame_13=//***** [q11-q18] variables for Flexis caleidoscope shader code *****
  236. per_frame_14=
  237. per_frame_15=// change
  238. per_frame_16=q13 = 0.5 + sin((bb-mm)*0.1)*0.25; // center x
  239. per_frame_17=q14 = 0.5 + sin((tt-mm)*0.1)*0.25; // center y
  240. per_frame_18=w = (bb-tt)*0.1; // angle
  241. per_frame_19=q16 = 0.25 - (db-dt)*0.025; // size
  242. per_frame_20=
  243. per_frame_21=//don't change
  244. per_frame_22=q11 = sin(w);
  245. per_frame_23=q12 = cos(w);
  246. per_frame_24=q17 = sin(-w);
  247. per_frame_25=q18 = cos(-w);
  248. per_frame_26=q15 = 1/q16;
  249. warp_1=`float2 factorA, factorB, product, julia;
  250. warp_2=`
  251. warp_3=`shader_body
  252. warp_4=`{
  253. warp_5=`
  254. warp_6=`// ***** Flexis Julia fractal code *****
  255. warp_7=`
  256. warp_8=`julia = lerp(uv_orig,uv,0); // this is scaling the input motion from the per-vertex-calc, fractals are sensitive you know ;)
  257. warp_9=`julia = (julia-0.5)*1.59; // apply some zoom
  258. warp_10=`
  259. warp_11=`//complex multiplication
  260. warp_12=`factorA = julia;
  261. warp_13=`factorB = julia;
  262. warp_14=`product = float2( factorA.x*factorB.x - factorA.y*factorB.y, // the products real part
  263. warp_15=` factorA.x*factorB.y + factorA.y*factorB.x); // the products imaginary part
  264. warp_16=`
  265. warp_17=`julia = product + float2(.61,.69); // adding 'c'
  266. warp_18=`
  267. warp_19=`ret = tex2D( sampler_fc_main, julia ) - 0.004; // give a gradient
  268. warp_20=`
  269. warp_21=`// *****
  270. warp_22=`
  271. warp_23=`}
  272. comp_1=`shader_body
  273. comp_2=`{
  274. comp_3=`
  275. comp_4=`// ***** Flexis rotating caleidoscope code *****
  276. comp_5=`
  277. comp_6=`float2 cntr = float2(q13,q14); float sin = q11; float cos = q12; float scale = q15;
  278. comp_7=`float2 uv_r = (uv-cntr)*aspect.xy;
  279. comp_8=` uv_r = scale*float2( cos*uv_r.x - sin*uv_r.y, sin*uv_r.x + cos*uv_r.y); // rotation
  280. comp_9=` uv_r = cntr + uv_r*aspect.zw;
  281. comp_10=` uv_r = 1.0 - abs( frac( uv_r * 0.5 ) * 2.0 - 1.0 ); // mirror
  282. comp_11=`
  283. comp_12=`sin = q17; cos = q18; scale = q16;
  284. comp_13=`float2 uv_rr = (uv_r-cntr)*aspect.xy;
  285. comp_14=` uv_rr = scale*float2( cos*uv_rr.x - sin*uv_rr.y, sin*uv_rr.x + cos*uv_rr.y); // counter-rotation
  286. comp_15=` uv_rr = cntr + (uv_rr)*aspect.zw;
  287. comp_16=`
  288. comp_17=`float2 caleidoscope_uv = uv_rr;
  289. comp_18=`
  290. comp_19=`// *****
  291. comp_20=`
  292. comp_21=`
  293. comp_22=`ret = GetBlur3(uv_rr) + (GetPixel(uv_rr)-GetBlur2(uv_rr))*2.4 - 0.1; // nice edge enhancing, also makes an aura
  294. comp_23=`
  295. comp_24=`ret = lerp(ret,GetPixel(uv),0.333); // blend
  296. comp_25=`
  297. comp_26=`}